﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Task/Task.master" AutoEventWireup="true"
    CodeFile="TaskItems.aspx.cs" Inherits="Task_WorkTask_TaskItems" StylesheetTheme="Content" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:GridView ID="UserGrid" runat="server" AutoGenerateColumns="False" OnRowDataBound="UserGrid_RowDataBound"
        OnRowEditing="UserGrid_RowEditing" OnRowCancelingEdit="UserGrid_RowCancelingEdit"
        OnRowUpdating="UserGrid_RowUpdating" OnRowCommand="UserGrid_RowCommand">
        <Columns>
            <asp:TemplateField>
                <ItemStyle HorizontalAlign="Center" />
                <HeaderStyle Width="30px" />
                <ItemTemplate>
                    <asp:Label ID="ID" runat="server"></asp:Label>
                    <asp:Label runat="server" ID="lblId" Visible="false" Text='<%# Eval("ItemId") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="任务内容" ItemStyle-Width="260">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblItemContent" Text='<%# Eval("ItemContent") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" Width="260" ID="txtItemContent" Height="70px" TextMode="MultiLine"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="简要完成情况" ItemStyle-Width="260">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblCircs" Text='<%# Eval("Circs") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" Width="260" ID="txtCircs" Height="70px" TextMode="MultiLine"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="完成时限" ItemStyle-Width="80">
                <ItemTemplate>
                    <%# Eval("FinishData")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox runat="server" ID="txtFinishDate" Width="80">
                    </asp:TextBox>
                    <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFinishDate">
                    </ajaxToolkit:CalendarExtender>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblOrderNo" Text='<%#Eval("OrderNo") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlOrderNo" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                        <asp:ListItem>11</asp:ListItem>
                        <asp:ListItem>12</asp:ListItem>
                        <asp:ListItem>13</asp:ListItem>
                        <asp:ListItem>14</asp:ListItem>
                        <asp:ListItem>15</asp:ListItem>
                        <asp:ListItem>16</asp:ListItem>
                        <asp:ListItem>17</asp:ListItem>
                        <asp:ListItem>18</asp:ListItem>
                        <asp:ListItem>19</asp:ListItem>
                        <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" EditText="编辑" CancelText="取消" UpdateText="修改" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton runat="server" ID="LinkButton1" Text="删除" CommandName="Del" CommandArgument='<%# Eval("ItemId") %>'
                        OnClientClick="return confirm('确定要删除此任务吗？')"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle HorizontalAlign="Left" />
    </asp:GridView>
    <table width="100%" cellpadding="0" cellspacing="0" class="intable">
        <caption>
            <span>添加子任务</span>
        </caption>
        <tr>
            <td>
                任&nbsp; 务&nbsp; 内&nbsp; 容：
            </td>
            <td>
                <asp:TextBox ID="txtContent" runat="server" Width="400px" Height="70px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                简要完成情况：
            </td>
            <td>
                <asp:TextBox ID="txtCirce" runat="server" Width="400px" Height="70px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                完&nbsp; 成&nbsp; 时&nbsp; 限：</td>
            <td>
                <asp:TextBox ID="txtFinishDate" runat="server"></asp:TextBox>
                <ajaxToolkit:CalendarExtender ID="txtFinishDate_CalendarExtender" 
                    runat="server" Enabled="True" TargetControlID="txtFinishDate">
                </ajaxToolkit:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td>
                排序号：
            </td>
            <td>
                <asp:DropDownList ID="ddlOrderNo" runat="server">
                    <asp:ListItem>0</asp:ListItem>
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                    <asp:ListItem>13</asp:ListItem>
                    <asp:ListItem>14</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>16</asp:ListItem>
                    <asp:ListItem>17</asp:ListItem>
                    <asp:ListItem>18</asp:ListItem>
                    <asp:ListItem>19</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="确定" />
                <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="返回" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Label runat="server" ID="Prompt" CssClass="prompt"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
